<template>
  <el-tooltip effect="dark" content="文本高亮" placement="top-start">
    <div ref="color_picker" class="el-tiptap-editor__command-button">
      <svg
        aria-hidden="true"
        width="16"
        height="15.058823529411764"
        viewBox="0 0 544 512"
        focusable="false"
        class="fa-icon"
      >
        <g>
          <path
            d="M0 480l68.3-70.5 67 67-35.5 35.5zM124.6 240l41.5-35.4 173.3 173.3-35.5 41.6c-9.5 10.8-24.4 15-38.2 10.8l-42.7-13.1-50.9 50.9-96.2-96.2 50.9-50.9-13-42.8c-0.9-2.9-1.6-7.7-1.6-10.7 0-9.1 5.5-21.4 12.4-27.4zM527.9 79.3c20.5 20.5 21.5 53.4 2.3 75.1l-169.9 199.1-169.8-169.8 199.1-170c21.7-19.2 54.6-18.1 75.1 2.4z"
          ></path>
        </g>
      </svg>
    </div>
  </el-tooltip>
</template>
<script>
import Colorpicker from "@/components/ElTipTapRichText/lib/ColorPicker.js";
export default {
  mounted() {
    Colorpicker.create({
      el: this.$refs.color_picker,
      poperClass: "app_color_picker",
      change: (hex) => {
        this.$emit("change", hex);
      },
    });
  },
};
</script>